import java.net.*;
public class ReceiveLetterForServer implements Runnable{
	public void run(){
		DatagramPacket pack=null;
		DatagramSocket postman=null;
		byte data[]=new byte[8192];
		try{
			pack = new DatagramPacket(data,data.length);
			postman=new DatagramSocket(666);
		}
		catch(Exception e){}
		while(true){
			if(postman==null)break;
			else
				try{
					postman.receive(pack);
					String message=new String(pack.getData(),0,pack.getLength());
					System.out.println("收到："+message);
				}
			catch(Exception e){}
		}
	}

	}